//常量配置类
package com.sy.util;

 
/**
 * Constant values used throughout the application.
 * 程序中用到的常量．  public static final 类型的
 * <p>
 * <a href="Constants.java.html"><i>View Source</i></a>
 * </p>
 *
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
 */
public class Constants {
    //~ Static fields/initializers =============================================
   
	
    /** The name of the ResourceBundle used in this application */
    public static final String BUNDLE_KEY = "ApplicationResources";

    /** The encryption algorithm key to be used for passwords */
    public static final String ENC_ALGORITHM = "algorithm";

    /** A flag to indicate if passwords should be encrypted */
    public static final String ENCRYPT_PASSWORD = "encryptPassword";

    /** File separator from System properties */
    public static final String FILE_SEP = System.getProperty("file.separator");

    /** User home from System properties */
    public static final String USER_HOME = System.getProperty("user.home") + FILE_SEP;

    /** The name of the configuration hashmap stored in application scope. */
    public static final String CONFIG = "appConfig";

    /** 
     * Session scope attribute that holds the locale set by the user. By setting this key
     * to the same one that Struts uses, we get synchronization in Struts w/o having
     * to do extra work or have two session-level variables.
     */ 
    public static final String PREFERRED_LOCALE_KEY = "org.apache.struts.action.LOCALE";
    public static final String USER_KEY = "userForm";
    public static final String USER_LIST = "userList";
    public static final String REGISTERED = "registered";
    public static final String ADMIN_ROLE = "admin";
    public static final String USER_ROLE = "user";
    public static final String USER_ROLES = "userRoles";
    public static final String AVAILABLE_ROLES = "availableRoles";
    
    
    public static final String ERROR_MSG="errormsg";
    
    
    public static final  String GLOBAL_USER="global_user";  
    public static final  String GLOBAL_RIGHTS="global_rights"; 
   
    
    public static final  String PROJECTLOG_CREAT="Create";
    public static final  String PROJECTLOG_EDIT="Edit";
    public static final  String PROJECTLOG_DELETE="Delete";
    public static final  String PROJECTLOG_IMPORT="Import";
    public static final  String PROJECTLOG_EXPORT="Export";

    /**
     * Operation 
     */
    
	public static final String ERRORMSG_NOEMAIL="没有Email 无法发送";
	
	public static final String ERRORMSG_FILEOUTOFSIZE="上传文件超过10M 无法发送";
	
	public static final String ERRORMSG_UPLOADERROR="上传的文件大小超过了10M或写入数据错误";
	
	public static final String ERRORMSG_UPERROR=" 上传文件失败！无法发送消息"; 
	
	
	
	
	
	public static final String ERRORMSG_SESSIONVALIDATE="很遗憾，您的页面已经过期！请您重新登录!";
	
	public static final String ERRORMSG_USERNOTEXIST="很抱歉，该用户名不存在！请您重新输入";
	
	public static final String ERRORMSG_USERERROR="很抱歉，您输入的用户名或密码错误！请您重新输入";
	
	public static final String ERRORMSG_USEROUT="很抱歉，您的用户名已被删除,请联系管理员！";
	
	
	
	

	public static final String ERRORMSG_DATAERROR="系统数据错误";
	
	public static final String ERRORMSG_DATABASEERROR="系统数据库访问错误";
	
	public static final String ERRORMSG_SERVERERROR="系统服务器错误";
	
	public static final String ERRORMSG_NULLDATAERROR="系统非法数据错误";
	
	
  /*
   * 导出字段设置
   * 
	 设备导出(1-0)
     sdp.DevName#sddl.DdlName#devty.DdlName#convert(varchar(10),sdp.Quality+sdp.QUnit) as devcount#sdp.DevExpense#sddl1.DdlName#sdp.UseDate#sdp.Trademark#sdp.SpecType#sdp.Configure#sdp.ProduceHome#sdp.ProduceArea#sdp.Useness#sdp.UseUnit#convert(varchar(10),sdp.AdjustPeriod+sdp.APUnit) as jiaozhun#convert(varchar(10),sdp.OverhaulPeriod+sdp.OPUnit) as jianxiu#sdp.RunDescribe#sdp.Comment
      设备名称#所属单位#设备类型#数量#金额#设备状态#使用日期#品牌#规格型号#配置#生产厂家#产地#用途#使用单位#校准周期#检修周期#运行情况描述#备注


     校准记录(1-1)
     ddl.DdlName as JCT#sd.DevName as devName#ddt.DdlName#convert(varchar(10),AdjustPeriod+APUnit) as jiaozhun#convert(varchar(100),sd.UseDate,23) as UseDate#case sd.APState when  '1' then '已校准' else '未校准' end as jiaozhunstate#case when sor.startdate is null then convert(varchar(10),'',120) else convert(varchar(100),sor.startdate,23) end as startdate#case sor.IsHaving when '1' then '有' else '无' end as haverecord#sor.Record#sor.Comment
      所属单位#设备名称#设备类型#校准周期#使用日期#校准状态#校准日期#有无记录#校准记录#备注

	检修记录(1-2)
     ddl.DdlName as JCT#sd.DevName as devName#ddt.DdlName#convert(varchar(10),overhaulPeriod+OPUnit) as jianxiu#convert(varchar(100),sd.UseDate,23) as UseDate#case sd.OPState when  '1' then '已检修' else '未检修' end as jianxiustate#case when sor.startdate is null then convert(varchar(10),'',120) else convert(varchar(100),sor.startdate,23) end as startdate#case sor.IsHaving when '1' then '有' else '无' end as haverecord#sor.Record#sor.Comment
      所属单位#设备名称#设备类型#检修周期#使用日期#检修状态#检修日期#有无记录#检修记录#备注


    站点导出(2-0)
    jct.ddlName#Sar_Station.StationName#bug.ddlName#OccurDate#case when   resolveDate IS not NULL  then  convert(varchar,convert(DECIMAL(10,2),(DateDiff (minute,convert(datetime,occurDate),convert(datetime,resolveDate))/60.00)))  else  '' end  as  buglength#case  when  resolveDate IS not NULL  then  '已处理'  else  '未处理' end  as resolveflag#BugDescribe#case when ResolveDate IS not NULL then convert(varchar,ResolveDate) else '' end as ResolveDate#ResolveMethod#BugReason#Sar_StationBug.Comment
    所属单位#站点名称#故障类型#故障时间#故障时长#处理情况#故障描述#处理时间#处理方法#故障原因#备注

    规划项目导出(3-0)
    Sar_Project_Layout.ProjName as projname#Sar_Project_Layout.LayProjID as layprojid# Sar_Project_Layout.SeqID as seqid# Sar_Project_Layout.StartTime as starttime#Sar_Project_Layout.ProjGrade as projgrade# Sar_Project_Layout.Property as property#Sar_Project_Layout.[Size] as size# Sar_Project_Layout.Adress as adress#Sar_Project_Layout.EndTime as endtime# Sar_Project_Layout.PlanInvest as pinvest# Sar_Project_Layout.PlanStartTime as pstime# Sar_Project_Layout.MainContent as content# Sar_Project_Layout.ParentProjID as parentprojid# Sar_Project_Layout.Comment as comment
	项目名称#规划项目编号#同级顺序号#开始年月#项目级别#建设性质#建设规模#建设地点#结束年月#投资估算#计划开工时间#主要建设内容#项目归属(父ID)#备注
	
	计划项目导出(3-1)
	Sar_Project_Plan.ProjName#ddljct.ddlname as jctName#spl.projname as layProjName#ddltype.ddlname as projtypeName#convert(varchar(10),Sar_Project_Plan.DeclareDate,120) as DeclareDate#case Sar_Project_Plan.KeYan when '0' then '无' else '有' end as KeYanDsp#case Sar_Project_Plan.ChuShe when '0' then '无' else '有' end as ChuSheDsp#convert(varchar(10),Sar_Project_Plan.PlanInvest)#convert(varchar(10),Sar_Project_Plan.KeYanInvest)#convert(varchar(10),Sar_Project_Plan.ChuSheInvest)#case Sar_Project_Plan.IsDeclare when '0' then '否' else '是' end as IsDeclare#case Sar_Project_Plan.IsApprove when '0' then '否' else '是' end as IsApprove#Sar_Project_Plan.Gist#case when Sar_Project_Plan.ChuSheInvest <> '.00' then Sar_Project_Plan.ChuSheInvest when Sar_Project_Plan.KeYanInvest <> '.00' then Sar_Project_Plan.KeYanInvest else Sar_Project_Plan.PlanInvest end as PlanInvestDsp#Sar_Project_Plan.MainContent#Sar_Project_Plan.Comment 
	项目名称#所属单位#项目归属#项目类型#申报时间#可研#初设#投资估算#可研批复投资#初设批复投资#申报情况#批准情况#依据#批复投资及汇总#主要内容#备注
	
	建设项目导出(3-2)
	ddljct.ddlname as jctName#spl.projname as layProjName#Sar_Project.ProjName#ddltype.ddlname as projtypeName#convert(varchar(10),Sar_Project.BuildDate,120) as BuildDate#case Sar_Project.IsYanShou when '0' then '未验收' else '已验收' end as IsYanShouDsp#case when Sar_Project.PlanInvest is null then '0.00' else convert(varchar(10),Sar_Project.PlanInvest) end as PlanInvestDsp#case when M.actualinvest is null then '0.00' else convert(varchar(10),M.actualinvest) end  as actualinvest#case when M.tiaogaiinvest is null then '0.00' else convert(varchar(10),M.tiaogaiinvest) end  as tiaogaiinvest#Sar_Project.Cycle#Sar_Project.MainContent#Sar_Project.Comment 
	所属单位#项目归属#项目名称#项目类型#建设时间#验收#批复投资#实际投资#调概投资#周期#主要内容#备注
	
	投资进度导出(3-3)
	('  - ' + sse.SubEngineName) as subEname#convert(varchar(10),sse.UnitPrice) as UnitPrice#convert(varchar(10),sse.Quality) as Quality,sse.PlanInvest#sse.ActualInvest#convert(varchar(10),sse.TiaoGaiInvest) as tiaoGaiInvest#(convert(decimal(10,2),sse.PlanInvest) - convert(decimal(10,2),sse.ActualInvest)) as margin#sse.Comment
	工程名称#单价（万元）#数量#批复投资（万元）#实际投资（万元）#调概投资#差额#备注#所属工程名
	
   监测台建筑导出(4-0)

   jct.ddlName#BuildName#budtype.ddlName#BuildStartDate#DxDate#UseDate#BuildLayer#BuildArea#ExtendBuildDate#ExtendBuildArea#BuildExpense#Comment
   所属单位#建筑名称#建筑类型#始建时间#大修时间#使用时间#建筑层数#建筑面积#扩建时间#扩建面积#造价#备注
   
   

	 */
}